package br.unifor.cct.mia;

import java.awt.Dimension;
import java.awt.Toolkit;

import javax.swing.JFrame;
import javax.swing.UIManager;

import br.unifor.cct.mia.gui.AGMiningMain;
import br.unifor.cct.mia.gui2.AGMiningV2;

public class AGMining {

	public AGMining() {
		JFrame frame = new AGMiningMain();
		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		Dimension frameSize = frame.getSize();
		if (frameSize.height > screenSize.height) {
			frameSize.height = screenSize.height;
		}
		if (frameSize.width > screenSize.width) {
			frameSize.width = screenSize.width;
		}
		frame.setLocation( ( screenSize.width - frameSize.width ) / 2, ( screenSize.height - frameSize.height ) / 2 );
		frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
		frame.setVisible(true);
	}

	public static void main(String[] args) {
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (Exception e) {
			e.printStackTrace();
		}
		new AGMining();
		/*java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new AGMiningV2().setVisible(true);
			}
		});*/
	}
}

